<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\Exchange
 *
 * @property int $id 兑换ID
 * @property int $user_id 用户ID
 * @property float $usdt_number USDT数量
 * @property float $rate 兑换汇率
 * @property float $bp_number BP数量
 * @property string|null $time 时间
 * @property-read \App\Models\User $user
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereBpNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereRate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereTime($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereUsdtNumber($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Exchange whereUserId($value)
 * @mixin \Eloquent
 */
class Exchange extends Model
{
    public $table = 'exchanges';

    public $timestamps = false;

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}
